package com.basic;


import com.frame.struts.BaseBean;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import com.utils.CommUtil;
import javax.servlet.http.HttpServletResponse;
import com.frame.struts.ActionContext;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2006</p>
 * <p>Company: </p>
 * @author not attributable
 * @version 1.0
 */

public class CorpSaleStateForm extends BaseBean{
    public CorpSaleStateForm() {
    }


	CorpSaleStateEntity css = new CorpSaleStateEntity();

	public String addCorpSaleState() {
		HttpServletRequest request = ActionContext.getActionContext().
			getRequest();
		HttpServletResponse response = ActionContext.getActionContext().
			getResponse();
		BasicFactory factory = new BasicFactory();
		String qyid = (String) request.getSession().getAttribute("session_qyid");
		css.setQyid(qyid);
		css.setOptdate(new Date());
		css.setOptrid(CommUtil.getUserId(request));
		try{
		if(factory.addCorpSaleState(css)){
			response.sendRedirect("/basic/queryCorpSaleState.jsp");
			return "success";
		}
		response.sendRedirect("/basic/failed.jsp");
		}catch(Exception e){

		}

		return "failed";
	}

	public String modifyCorpSaleState(){
		HttpServletRequest request = ActionContext.getActionContext().
			getRequest();
		HttpServletResponse response = ActionContext.getActionContext().
			getResponse();
		BasicFactory factory = new BasicFactory();
		String qyid = (String) request.getSession().getAttribute("session_qyid");
		css.setQyid(qyid);
		css.setOptdate(new Date());
		css.setOptrid(CommUtil.getUserId(request));
		factory.deleteCorpSaleState(css.getId());
		try{
		if(factory.addCorpSaleState(css)){
			response.sendRedirect("/basic/queryCorpSaleState.jsp");
			return "success";
		}
		response.sendRedirect("/basic/failed.jsp");
		}catch(Exception e){

		}

		return "failed";
	}
	/**
 * @return css. return css.s the glry.
 */
public String getGlry() {
	return css.getGlry();
}
/**
 * @param glry The glry to set.
 */
public void setGlry(String glry) {
	css.setGlry(glry);
}
/**
* @return css. return css.s the id.
*/
public int getId() {
return css.getId();
}
/**
* @param id The id to set.
*/
public void setId(int id) {
css.setId(id);
}
/**
 * @return css. return css.s the jsgr.
 */
public String getJsgr() {
	return css.getJsgr();
}
/**
 * @param jsgr The jsgr to set.
 */
public void setJsgr(String jsgr) {
	css.setJsgr(jsgr);
}
/**
 * @return css. return css.s the mlr.
 */
public double getMlr() {
	return css.getMlr();
}
/**
 * @param mlr The mlr to set.
 */
public void setMlr(double mlr) {
	css.setMlr(mlr);
}
/**
 * @return css. return css.s the nyye.
 */
public double getNyye() {
	return css.getNyye();
}
/**
 * @param nyye The nyye to set.
 */
public void setNyye(double nyye) {
	css.setNyye(nyye);
}
/**
 * @return css. return css.s the optdate.
 */
public Date getOptdate() {
	return css.getOptdate();
}
/**
 * @param optdate The optdate to set.
 */
public void setOptdate(Date optdate) {
	css.setOptdate(optdate);
}
/**
 * @return css. return css.s the optrid.
 */
public String getOptrid() {
	return css.getOptrid();
}
/**
 * @param optrid The optrid to set.
 */
public void setOptrid(String optrid) {
	css.setOptrid(optrid);
}
/**
 * @return css. return css.s the qyid.
 */
public String getQyid() {
	return css.getQyid();
}
/**
 * @param qyid The qyid to set.
 */
public void setQyid(String qyid) {
	css.setQyid(qyid);
}
/**
 * @return css. return css.s the recstate.
 */
public String getRecstate() {
	return css.getRecstate();
}
/**
 * @param recstate The recstate to set.
 */
public void setRecstate(String recstate) {
	css.setRecstate(recstate);
}
/**
 * @return css. return css.s the remark.
 */
public String getRemark() {
	return css.getRemark();
}
/**
 * @param remark The remark to set.
 */
public void setRemark(String remark) {
	css.setRemark(remark);
}
/**
 * @return css. return css.s the sczyl.
 */
public double getSczyl() {
	return css.getSczyl();
}
/**
 * @param sczyl The sczyl to set.
 */
public void setSczyl(double sczyl) {
	css.setSczyl(sczyl);
}
/**
 * @return css. return css.s the zc.
 */
public String getZc() {
	return css.getZc();
}
/**
 * @param zc The zc to set.
 */
public void setZc(String zc) {
	css.setZc(zc);
}
/**
 * @return css. return css.s the zyyw.
 */
public String getZyyw() {
	return css.getZyyw();
}
/**
 * @param zyyw The zyyw to set.
 */
public void setZyyw(String zyyw) {
	css.setZyyw(zyyw);
}

}